import 'package:flutter/material.dart';

import 'entry.dart';
import 'pages/changeLogPage.dart';
import 'pages/clipboardPage.dart';
import 'pages/dsEditorPage.dart';
import 'pages/indexPage.dart';
import 'pages/megaSitePage.dart';
import 'pages/topicLibPage.dart';
import 'pages/traitSearchPage.dart';

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: Entry.AppName,
      initialRoute: Routes.IndexPage,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      routes: {
        Routes.IndexPage: (context) => IndexPage(),
        Routes.DSEditor: (context) => DSEditorPage(),
        Routes.TraitSearch: (context) => TraitSearchPage(
              configName: 'local',
            ),
        Routes.ChangeLog: (context) => ChangeLogPage(
              title: Entry.ChangeLog,
              table: Entry.p_changelog,
              configName: 'local',
            ),
        Routes.Clipboard: (context) => ClipboardPage(
            title: Entry.Clipboard,
            table: Entry.p_clipboard,
            configName: 'local'),
        Routes.MegaSite: (context) => MegaSitePage(
            title: Entry.MegaSite, table: Entry.p_site, configName: 'local'),
        Routes.FlutterLib: (context) => TopicLabPage(
            title: Entry.FlutterLib,
            table: Entry.flutter_lib,
            configName: 'stage'),
      },
    );
  }
}
